# plot all RDD coefficients for 30 day bw 
load("multi.RData")

multi$coef <- c(coef61, coef1,coef2,coef3,coef4,coef5,coef6,coef7,coef8,
                coef9,coef10,coef11,coef12,coef13,coef13IT, coef14, coef15, 
                coef15IT,coefCCa,coefITa)

multi$lowerci <- c(low61, low1,low2,low3,low4,low5,low6,low7,low8,low9,
                   low10,low11,low12,low13, low13IT,low14,low15,low15IT,
                   lowCCa,lowITa)

multi$upperci <- c(up61, up1,up2,up3,up4,up5,up6,up7,up8,up9,
                   up10,up11,up12,up13, up13IT, up14, up15, up15IT,
                   upCCa,upITa)

multi$se <- c(se61, se1,se2,se3,se4,se5,se6,se7,se8,
              se9,se10,se11,se12,se13,"X", se14, se15, 
              "X", "X", "X")



multi$date <- factor(multi$date, levels=unique(multi$date))
appendixc <- ggplot(multi, aes(x = date, y = coef, color = Sample)) +
  geom_hline(yintercept = 0, color = "black", linetype = "dashed", size = 1) +
  geom_point(size = 7, position=position_dodge(0.5)) +
  geom_errorbar(aes(ymin = lowerci, ymax = upperci), size = 2, width = 0.2, position = position_dodge(0.5)) +
  ylim(-4,4) +
  scale_colour_manual(values = c("Italy only" = "#F8766D", "Cross-national" = "#00BFC4")) +
  theme_light(base_size = 30) +
  scale_x_discrete(guide = guide_axis(angle = 90)) +
  xlab("Date of the Event") +
  ylab("RDD Coefficient")
appendixc

multi$coefb <- c(coef62, coef1b,coef2b,coef3b,coef4b,coef5b,coef6b,coef7b,coef8b,
                 coef9b,coef10b,coef11b,coef12b,coef13b, coef13bIT, coef14b, coef15b, coef15bIT,
                 coefCCb,coefITb)

multi$lowercib <- c(low62, low1b,low2b,low3b,low4b,low5b,low6b,low7b,low8b,low9b,
                    low10b,low11b,low12b,low13b, low13bIT, low14b, low15b, low15bIT,
                    lowCCb, lowITb)

multi$uppercib <- c(up62, up1b,up2b,up3b,up4b,up5b,up6b,up7b,up8b,up9b,
                    up10b,up11b,up12b,up13b,up13bIT, up14b, up15b, up15bIT,
                    upCCb,upITb)

multi$seb <- c(se62, se1b,se2b,se3b,se4b,se5b,se6b,se7b,se8b,
               se9b,se10b,se11b,se12b,se13b, "X", se14b, se15b, "X", "X", "X")


multi$date <- factor(multi$date, levels=unique(multi$date))
mainc <- ggplot(multi, aes(x = date, y = coefb, color = Sample)) +
  geom_hline(yintercept = 0, color = "black", linetype = "dashed", size = 1) +
  geom_point(size = 7, position=position_dodge(0.5)) +
  geom_errorbar(aes(ymin = lowercib, ymax = uppercib), size = 2, width = 0.2, position = position_dodge(0.5)) +
  ylim(-2,2) +
  scale_colour_manual(values = c("Italy only" = "#F8766D", "Cross-national" = "#00BFC4")) +
  theme_light(base_size = 30) +
  scale_x_discrete(guide = guide_axis(angle = 90)) +
  xlab("Date of the Event") +
  ylab("RDD Coefficient")
mainc



